window.onload = function(){
  var box = document.querySelector('.box');
  box.onclick = function(){
    console.log(123);
  }
}